var container = new Vue({
    el:'#container',
    data:{
        menuBarList:[],
        order:1,
    },
    methods:{
        /**
         * 侧边栏单击跳转事件
         * 此方法type=1:一级菜单 type=2:二级菜单
         * menu.name:判断当前菜单的名称
         */
        handClick:function(type,menu){
            var _this = this;

            if(type=="1"){
                switch(menu.name){
                    case "维修清单":
                        _this.order = 1;
                        break;
                    case "库存管理":
                        _this.order = 2;
                        break;
                    case "会员活动":
                        _this.order = 3;
                        break;
                    case "财务报表":
                        _this.order = 4;
                        break;
                    case "系统管理":
                        _this.order = 5;
                        break;
                    default:
                        break;
                }
            }else{
                switch(menu.name){
                    /*case "活动管理":
                        _this.order = 3.1;
                        break;
                    case "会员管理":
                        _this.order = 3.2;
                        break;
                    case "会员消费":
                        _this.order = 3.3;
                        break;*/
                    case "积分查询":
                        _this.order = 3.4;
                        break;
                    case "数据报表":
                        _this.order = 4.1;
                        break;
                    /*case "图形报表":
                        _this.order = 4.2;
                        break;*/
                    default:
                        break;
                }
            }
        },
    },
    created:function(){
        var _this = this;
        var menuBar = [{class:"mtain current",name:"维修清单"},
                       {class:"invent",name:"库存管理"},
                       {class:"member",name:"会员活动",val:[{name:"积分查询"}]},
                       {class:"financial",name:"财务报表",val:[{name:"数据报表"}]},
                       {class:"car_shop",name:"汽车商城",},
                       {class:"part",name:"系统管理",val:[{name:"用户管理"},{name:"部门管理"},{name:"角色管理"}]},];
        _this.menuBarList = menuBar;
        //$("ul").find("ul").eq(0).css("display","block");

    }
});